# Declaration of variables
CC = g++
CC_FLAGS = -I ./includes/ -I ./includes/pcap -L ./lib -lpcap32

# File names
EXEC = trafficmonitor
SOURCES = $(wildcard src/*.cpp)
OBJECTS = $(SOURCES:.cpp=.o)

# Main target
$(EXEC), all: $(OBJECTS)
	$(CC) $(OBJECTS) -o ./bin/$(EXEC) $(CC_FLAGS)

# To obtain object files
%.o: %.cpp
	$(CC) -c $(CC_FLAGS) $< -o $@

# To remove generated files
clean:
	rm -f $(EXEC) $(OBJECTS)